<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="swiper-bundle.css">
    <script src="swiper-bundle.js"></script>
    <title>Document</title>
    <style>
        .swiper-container {
            width: 1000px;
            height: 500px;
            margin: auto;
            margin-top: 100px;
        }

        .swiper-wrapper {
            height: 100%;
        }

        .swiper-wrapper>.swiper-slide {
            height: 100%;
        }

        .swiper-wrapper>.swiper-slide img {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><img src="img/lunbo.png" alt=""></div>
            <div class="swiper-slide"><img src="img/lunbo2.png" alt=""></div>
            <div class="swiper-slide"><img src="img/lunbo3.png" alt=""></div>
            <div class="swiper-slide"><img src="img/lunbo4.png" alt=""></div>
            <div class="swiper-slide"><img src="img/lunbo5.png" alt=""></div>

        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>

        <!-- 如果需要导航按钮 -->
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
    </div>
    <script>
        var mySwiper = new Swiper('.swiper-container', {
            autoplay: true, //可选选项，自动滑动
            // direction: 'vertical',垂直翻动
            freeMode: true, //自由滑动
            // grabCursor: true,//换成手指
            breakpointsBase: "window",
            loop: true, //轮播循环，
            autoplay: true, //自动循环
            speed: 300, //切换速度
            //左右按钮设置
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
            //小圆点设置
            pagination: {
                el: '.swiper-pagination',
                type: "bullets", //小圆点样式，默认小圆点
                dynamicBullets: true, //这个很好用，小圆点分页隐藏
                clickable: true,
            },
            effect: 'flip', //轮播图效果切换
        })
    </script>
</body>

</html>